package com.example.game.hff;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.io.IOException;
import java.net.URL;
import java.util.LinkedList;

import javax.imageio.ImageIO;

public class Skill implements Constants{
	
	private Image image;//표시될 이미지
	private int x, y;//위치 정보
	

	
	
	
	public Skill() {
		
		x = 700;
		y = 10;
		
	}
	
	
	public void draw(Graphics g) {
		g.drawImage(image, x, y,  null);
				
		try {			
		if ( Player.skillPoint == 2) {
			
			URL url = getClass().getResource("/skill2.png");
			Image image1 = ImageIO.read(url);
			image = image1.getScaledInstance(92, 30,
					Image.SCALE_SMOOTH);			
			
		} else if (Player.skillPoint == 1) {
			
			URL url = getClass().getResource("/skill1.png");
			Image image2 = ImageIO.read(url);
			image = image2.getScaledInstance(42, 30,
					Image.SCALE_SMOOTH);			
			
		} else if (Player.skillPoint == 0) {
			
			URL url = getClass().getResource("/zero1.png");
			Image image3 = ImageIO.read(url);
			image = image3.getScaledInstance(30, 30,
					Image.SCALE_SMOOTH);
			
		}
			 

		} catch (Exception ex) {}			 

	}
	

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}
	
	public int getWidth() {
		return image.getWidth(null);
	}
	
	public int getHeight() {
		return image.getHeight(null);
	}

}
